package com.hziee.graduate.ticket.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_history")
public class History extends Model<History> {

    //浏览历史记录id
    @TableId(type = IdType.AUTO)
    private Long historyId;
    //外键：浏览了哪部影片
    private Long movieId;
    //外键：哪个用户的浏览记录
    private Long userId;
    //什么时候浏览的
    private LocalDateTime createTime;


    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.historyId;
    }
}

